package com.prothink.service.impl;

import com.prothink.dao.JsMicrocicleDao;
import com.prothink.entity.FenyeNode;
import com.prothink.entity.JsMicrocircle;
import com.prothink.service.JsMicrocicleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class JsMicrocicleServiceImpl implements JsMicrocicleService {
    @Autowired
    private JsMicrocicleDao jsMicrocicleDao;
    @Override
    //查看微圈表数据
    public FenyeNode<JsMicrocircle> getMicrocicle(JsMicrocircle formInline) {
        FenyeNode<JsMicrocircle> nodejsmic = new FenyeNode<>();
        int count = jsMicrocicleDao.getCount();
        nodejsmic.setCount(count);
        List microcicle = jsMicrocicleDao.getMicrocicle(formInline);
         nodejsmic.setMicrocicle(microcicle);
        return nodejsmic;
    }

    @Override
    public int delsplice(int id) {
        return jsMicrocicleDao.delsplice(id);
    }
}
